﻿using OpenQA.Selenium;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenWTF.Selenium;

namespace OpenWTF
{
    public abstract class AutomatedPage
    {
        private IWebDriver WebDriver
        {
            get
            {
                return SeleniumWebDriver.getDriver();
            }
        }

        public virtual IWebElement FindElement(By by)
        {
            return WebDriver.FindElement(by);
        }
    }

    public abstract class AutomatedPage<TAutomatedPage> : AutomatedPage where TAutomatedPage : new()
    {
        abstract private void add(AutomatedPage automatedPage);
        abstract private void remove(AutomatedPage automatedPage);
        abstract private TAutomatedPage getPageSection(AutomatedPage automatedPage);
    }
}
